import axios from "axios";
import type {TableListParams} from './data.d';

export async function querySysLog(params?: TableListParams) {
  try {
    const response = await axios.get('/api/sys/sysLog/list',{
      params: {
        ...params,
      },
    });
    // console.log(response.data);
    return response.data;
  } catch (error) {
    // console.error('Error fetching data:', error);
    return [];
  }
}

export async function removeSysLog(params: { ids: number[] }) {
  try {
    const response = await axios.delete('/api/sys/sysLog/delete',{
      params: {
        ...params,
      },
    });
    // console.log(response.data);
    return response.data;
  } catch (error) {
    // console.error('Error fetching data:', error);
    return [];
  }
}
